geopandas bbox

29

from shapely.geometry import Point, Polygon, LineString
>>> d = {'geometry': [Point(2, 1), Polygon([(0, 0), (1, 1), (1, 0)]),
... LineString([(0, 1), (1, 2)])]}
>>> gdf = geopandas.GeoDataFrame(d, crs="EPSG:4326")
>>> gdf.bounds
   minx  miny  maxx  maxy
0   2.0   1.0   2.0   1.0
1   0.0   0.0   1.0   1.0
2   0.0   1.0   1.0   2.0

Comments

Submit
0 Comments